/* styles.css */

:root {
    --primary: #4e54c8;
    --secondary: #8f94fb;
    --white: #ffffff;
    --shadow: rgba(0, 0, 0, 0.1);
    --text-shadow: rgba(0, 0, 0, 0.3);
}

body {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: inset 0 0 20px var(--shadow);
    padding: 2rem;
    box-sizing: border-box;
}

.container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    max-width: 800px;
    width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

h1, h2, h3 {
    text-align: center;
    color: var(--white);
    text-shadow: 1px 1px 4px var(--text-shadow);
    margin: 0 0 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

h2 {
    font-size: 1.8rem;
    font-weight: 600;
}

p {
    color: var(--white);
    line-height: 1.6;
    margin: 0 0 1.5rem;
}

.btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-primary {
    background: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary {
    background: var(--secondary);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.btn-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 2rem 0;
}

.subtitle {
    color: var(--white);
    text-align: center;
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px var(--text-shadow);
}

.btn-custom {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    padding: 0.8rem 2rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-custom:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-custom::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

input[type="file"] {
    display: none;
}

label[for^="file-upload"] {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

label[for^="file-upload"]:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

label[for^="file-upload"]::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

label[for^="file-upload"]:hover::after {
    transform: translateX(100%);
}

.upload-input {
    display: none;
}

.upload-label {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    padding: 1.5rem;
    border-radius: 15px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.upload-label:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.upload-container {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
}

.upload-card {
    background: rgba(78, 84, 200, 0.3) !important;
    border-radius: 15px !important;
    padding: 1.5rem !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    margin-bottom: 1.5rem !important;
}

/* Ensure all upload cards have consistent styling */
.upload-container .upload-card {
    background: rgba(78, 84, 200, 0.3) !important;
    border-radius: 15px !important;
    padding: 1.5rem !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    margin-bottom: 1.5rem !important;
}

/* Specific fix for first upload card */
.upload-container .upload-card:first-of-type {
    background: rgba(78, 84, 200, 0.3) !important;
    border-radius: 15px !important;
    padding: 1.5rem !important;
    border: 2px solid rgba(255, 255, 255, 0.4) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
}

.file-upload-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.file-upload-preview {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    object-fit: cover;
    border: rgba(255, 255, 255, 0.2) 1px solid;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: none;
}

.file-upload-info {
    color: var(--white);
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.8;
    max-width: 80%;
}

.file-upload-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 15px;
    margin: 1rem 0;
}

.file-upload-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    border: 1px dashed rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.file-upload-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.file-upload-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--white);
    opacity: 0.9;
}

.preview-area {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin: 2rem 0;
    width: 100%;
    display: none;
}

.preview-area:not(:empty) {
    display: flex;
}

.preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 1rem;
}

.image-preview {
    aspect-ratio: 1/1;
    padding: 1rem;
}

.video-preview {
    aspect-ratio: 16/9;
    min-height: 120px;
    padding: 1rem;
}

.audio-preview {
    height: 80px;
    aspect-ratio: unset;
    padding: 1rem;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.video-preview video {
    width: 100%;
    height: 100%;
}

.video-preview video {
    width: 100%;
    height: 100%;
}

.audio-preview audio {
    width: 90%;
}

.preview-item-audio {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
}

.preview-item-audio audio {
    width: 90%;
    max-width: 200px;
}

.preview-item-document {
    width: 100%;
    height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

.preview-item-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.7rem;
    padding: 0.3rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

audio::-webkit-media-controls-panel {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0 0 8px 8px;
}

.file-name {
    color: var(--white);
    font-size: 0.9rem;
    margin-top: 0.5rem;
    text-align: center;
    word-break: break-word;
    padding: 0 0.5rem;
}

.preview-item-remove {
    position: absolute;
    top: 0.3rem;
    right: 0.3rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preview-item-remove:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: scale(1.1);
}

.preview-item-document {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
}

.preview-item-document-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
}

.preview-item-document-name {
    font-size: 0.8rem;
    color: var(--white);
    word-break: break-all;
    padding: 0 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    h2 {
        font-size: 1.5rem;
    }
    .container {
        padding: 1.5rem;
    }
    .btn-group {
        flex-direction: column;
        align-items: center;
    }
}
